#pragma once

#include <AVUITimeline.h>

namespace AVUI {

class AnimationClock;

class AnimationTimeline : public Timeline
{
public:
    DECLARE_ELEMENT(AnimationTimeline, Timeline);

    virtual ObjectPtr GetCurrentValue(Object* pDefaultOriginValue, Object* pDefaultDestinationValue, AnimationClock* pAnimationClock)
    {
          return pDefaultDestinationValue;
    } 

    TRefCountedPtr<AnimationClock> CreateClock();
    virtual TRefCountedPtr<Clock> AllocateClock();

    AnimationTimeline() { }

    DECLARE_DEPENDENCY_PROPERTY(IsAdditive);
    DECLARE_DEPENDENCY_PROPERTY(IsCumulative);

protected:

    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<AnimationTimeline>().get_Ptr(); }
    virtual Duration get_NaturalDurationCore(const Clock* pClock) { return (Duration) TimeSpan::FromMilliseconds(1000); }

private:
    static void StaticConstructor();
};


}; // namespace AVUI
